package com.governtalk.backend.service;

import com.governtalk.backend.dto.resource.LearningResourceDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface ResourceService {
    
    Page<LearningResourceDto> searchResources(String keyword, String type, Long categoryId, 
                                            String sortBy, String sortOrder, Pageable pageable);
    
    List<LearningResourceDto> getHotResources(int count);
    
    List<LearningResourceDto> getNewResources(int count);
    
    LearningResourceDto getResourceDetail(Long resourceId);
    
    LearningResourceDto uploadResource(MultipartFile file, String title, String description, 
                                     String type, Long categoryId);
    
    String downloadResource(Long resourceId);
    
    void favoriteResource(Long resourceId);
    
    Page<LearningResourceDto> getFavoriteResources(Pageable pageable);
    
    Page<LearningResourceDto> getResourceReviews(Long resourceId, Pageable pageable);
    
    void addResourceReview(Long resourceId, Integer rating, String content);
    
    void approveResource(Long resourceId, Boolean approved, String reason);
    
    void deleteResource(Long resourceId);
    
    List<LearningResourceDto> getResourceCategories();
}
